import { d as defineComponent, r as ref, o as openBlock, c as createElementBlock, b as createVNode, a as resolveComponent } from "./index-NZguwuNX.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "Pagination",
  props: ["total"],
  emits: ["handleSizeChange", "handleCurrentChange"],
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const currentPage = ref(1);
    const pageSize = ref(15);
    const small = ref(false);
    const background = ref(false);
    const disabled = ref(false);
    const handleSizeChange = (val) => {
      console.log(`${val} items per page`);
      emit("handleSizeChange", val);
    };
    const handleCurrentChange = (val) => {
      console.log(`current page: ${val}`);
      emit("handleCurrentChange", val);
    };
    return (_ctx, _cache) => {
      const _component_el_pagination = resolveComponent("el-pagination");
      return openBlock(), createElementBlock("div", null, [
        createVNode(_component_el_pagination, {
          "current-page": currentPage.value,
          "onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => currentPage.value = $event),
          "page-size": pageSize.value,
          "onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pageSize.value = $event),
          "page-sizes": [10, 15, 20, 50, 100],
          small: small.value,
          disabled: disabled.value,
          background: background.value,
          layout: "total, sizes, prev, pager, next, jumper",
          total: __props.total,
          onSizeChange: handleSizeChange,
          onCurrentChange: handleCurrentChange
        }, null, 8, ["current-page", "page-size", "small", "disabled", "background", "total"])
      ]);
    };
  }
});
export {
  _sfc_main as _
};
